hotplug/Linux: do not leak lockfiles
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 5 Jul 2012 11:40:25 +0000 (12:40 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 5 Jul 2012 11:40:25 +0000 (12:40 +0100)
commit334f50ccc4e3f3a045874de9aca77adc76e900be
treed959db86e457929480bba518763c28905431e4a9
parentf9cc7456425b542feb4a2e6f4bd5a7db44f5eaf0
hotplug/Linux: do not leak lockfiles

25590:bb250383a4f5 introduced a new locking scheme.  Unfortunately it
leaves behind files in /var/run/xen-hotplug.  These are spotted as
regressions by the autotester.

Fix this.  This involves changing the locking protocol to allow
lockfiles to be deleted (as removing lockfiles is unsafe with a naive
flock-based algorithm).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/hotplug/Linux/locking.sh